package plugin;

import noyau.Noyau;

public class Ram extends Plugin implements Sonde{
	private int ram;
	private Mon_thread thread;
	
	private class Mon_thread extends Thread {
		public void run(){
			while(true){
				ram=(int)(Math.random()*100);
				try {
					Thread.sleep(500);
			    }
				catch (InterruptedException ex) {}
			}

		}
	}
	
	
	public Ram(){
		thread = new Mon_thread();
		
	}
	
	public void init(Noyau n){
		super.init(n);
		thread.start();
	}
	
	public void run(){
	}
	
	public int get(){
		return ram;
	}
	public String getDescription(){
		return "Ram disponible";
	}
}
